/*
 * BaseDom.java
 *
 * Project: TECHWATCH - TESTING TECHNOLOGIES
 *
 * Copyright 2008 by ELCA Informatique SA
 * Av. de la Harpe 22-24, 1000 Lausanne 13
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of ELCA Informatique SA. ("Confidential Information"). You
 * shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license
 * agreement you entered into with ELCA.
 */

package ch.elca.training.dom;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

/**
 * This class is base class for all DOM in this project.
 *
 * <script type="text/javascript">printFileStatus
 *   ("$URL: https://cvs.elca.ch/subversion/cxnet-portal/trunk/etc/eclipse/preferences_2008_03_03.epf $",
 *    "$Revision: 334 $",
 *    "$Date: 2008-03-03 16:07:32 +0700 (Mon, 03 Mar 2008) $",
 *    "$Author: qkp@ELCA.CH $"
 *    "$Id:$"
 * );</script>
 *
 * @author qkp
 */

@MappedSuperclass
@SuppressWarnings(value = { "serial" })
public class BaseDom implements Serializable {
    
	/**
	 * 
	 */
	public static final String COLUMN_ID = "Id";
    @Id 
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = COLUMN_ID, nullable = false, updatable = false)	
	private long m_id;
    
    public static final String COLUMN_VERSION = "Version";
    @Version
    @Column(name = COLUMN_VERSION, nullable = false)	
	private long m_version;

    public long getId() {
        return m_id;
    }

    public void setId(long id) {
        m_id = id;
    }

	public void setVersion(long version) {
		this.m_version = version;
	}

	public long getVersion() {
		return m_version;
	}

}